﻿@model MMPS.Entity.ViewModel.MemCardsListViewModel

@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>编辑信息</title>
    @*引入包*@
    <link href="~/Content/Easy UI/themes/icon.css" rel="stylesheet" />
    <link href="~/Content/Easy UI/themes/default/easyui.css" rel="stylesheet" />
    <script src="~/Content/Easy UI/script/jquery-1.11.1.js"></script>
    <script src="~/Content/Easy UI/script/jquery.easyui.min.js"></script>
    <script src="~/Content/Easy UI/script/easyui-lang-zh_CN.js"></script>
    @*时间引用*@
    @*<script src="~/Content/Easy UI/script/Toolkit.js"></script>*@
    <script type="text/javascript">
        $(function () {
            $("#btn").click(function () {
                //首先获取url
                var url = "/MemCardsInfo/MemCardsCreate";
                //再判断隐藏标签中是否有id
                var MC_ID = $("#MC_ID").val();
                if (parseInt(MC_ID) > 0) {
                    url = "/MemCardsInfo/MemCardsCreate";
                }
                //获取所有文本框信息
                var dataForm = $("#Form_MemCards").serializeArray();
                $.post(url, dataForm, function (data) {
                    //判断状态是否为1
                    if (data.ResultStatus == 1) {
                        window.parent.$.messager.alert("温馨提示", data.Msg, "info");
                        //关闭窗口
                        window.parent.$("#dlg").dialog("close");
                        //刷新页面
                        window.parent.$("#MemCard").datagrid("reload");
                    } else {
                        window.parent.$.messager.alert("温馨提示", data.Msg, "error");
                    }
                });//post
            });


        })
    </script>

</head>
<body>
    @using (Html.BeginForm("","",FormMethod.Post,new { id= "Form_MemCards" }))
    {
    <fieldset>
        <legend>会员基本信息</legend>
        <table>
            <tr>
                <td>会员卡号：</td>
                <td>
                    @Html.EditorFor(model => model.MC_CardID, new { htmlAttributes = new { @class = "form-control", style = "border:1px solid blue" } })
                </td>
                <td></td>
                <td></td>
            </tr>

            <tr>
                <td>会员姓名：</td>
                <td>@Html.EditorFor(model => model.MC_Name, new { htmlAttributes = new { @class = "form-control", style = "border:1px solid blue" } })</td>
                <td>手机号：</td>
                <td>@Html.EditorFor(model => model.MC_Mobile, new { htmlAttributes = new { @class = "form-control", style = "border:1px solid blue" } })</td>
            </tr>
            <tr>
                <td>卡片密码：</td>
                <td>@Html.EditorFor(model => model.MC_Password, new { htmlAttributes = new { @class = "form-control" , style = "border:1px solid blue" } })</td>
                <td>确认密码：</td>
                <td>@Html.EditorFor(model => model.MC_Password, new { htmlAttributes = new { @class = "form-control", style = "border:1px solid blue" } })</td>
            </tr>

            <tr>
                <td>会员性别：</td>
                <td>
                    @Html.EditorFor(model => model.MC_Sex, new { htmlAttributes = new { @class = "form-control" , style = "border:1px solid blue" } })
                </td>
                <td>会员等级：</td>
                <td>
                    @Html.DropDownListFor(model => model.CL_ID,ViewBag.CL_ID as IEnumerable<SelectListItem>, new { htmlAttributes = new { @class = "form-control", style = "border:1px solid blue" } })
                    @Html.EditorFor(model => model.CL_ID, new { htmlAttributes = new { @class = "form-control", style = "border:1px solid blue" } })
                </td>
            </tr>


            @*<tr>
                <td>会员生日：</td>
                <td>
                    单选按钮 公历，阴历
                    @Html.EditorFor(model => model.MC_ID, new { htmlAttributes = new { @class = "form-control"} })
                </td>
                <td></td>
                <td>@Html.EditorFor(model => model.MC_Birthday_Month, new { htmlAttributes = new { @class = "form-control", style="width:60px;border:1px solid blue" } })月 @Html.EditorFor(model => model.MC_Birthday_Day, new { htmlAttributes = new { @class = "form-control" , style = "width:60px;border:1px solid blue" } }) 日 </td>
            </tr>*@

            @*<tr>
                <td colspan="3">单选框  @Html.EditorFor(model => model.MC_IsPast, new { htmlAttributes = new { @class = "form-control" } })  设置卡片过期时间(到期此卡片自动失效)</td>

                <td>@Html.EditorFor(model => model.MC_IsPast, new { htmlAttributes = new { @class = "form-control", style = "border:1px solid blue" } })</td>
            </tr>*@
            <tr>
                <td colspan="4"><hr /></td>
            </tr>
            @*<tr>
                <td>积分数量：</td>
                <td>@Html.EditorFor(model => model.MC_Point, new { htmlAttributes = new { @class = "form-control", style = "border:1px solid blue" } })</td>
                <td colspan="2">@Html.EditorFor(model => model.MC_IsPointAuto, new { htmlAttributes = new { @class = "form-control" } }) 积分是否可以自动转换成等级</td>
            </tr>*@
            <tr>
                <td>推荐人：</td>
                <td>@Html.EditorFor(model => model.MC_RefererCard, new { htmlAttributes = new { @class = "form-control", style = "border:1px solid blue" } }) <a id="btn1" href="#" class="easyui-linkbutton">查找</a></td>
                <td>推荐人姓名：</td>
                <td>@Html.EditorFor(model => model.MC_RefererName, new { htmlAttributes = new { @class = "form-control", style = "border:1px solid blue" } })</td>
            </tr>
            <tr>
                <td></td>
                <td></td>
                <td></td>
                <td><input type="button" value="提交" class="btn btn-default" id="btn" /></td>
            </tr>
        </table>
        @Html.HiddenFor(model => model.MC_ID, new { htmlAttributes = new { @class = "form-control" } })
    </fieldset>
       
    }

</body>
</html>
